<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<div>
	 <a id="importIndex" href="javascript:void(0)" class="easyui-linkbutton" onclick="importIndex()">一键导入商品数据至索引库</a>
</div>
<script type="text/javascript">
	function importIndex() {
		$('#importIndex').linkbutton('disable');
		$.post("/search/import",function(data){
			if(data.status == 200){
				$.messager.alert('提示','导入索引库成功!');
				$('#importIndex').linkbutton('enable');
			}else{
				$.messager.alert('提示','导入索引库失败!');
				$('#importIndex').linkbutton('enable');
			}
		});		
	}
</script>